package com.qfjy.homework.ganmin;

/**
 * @author : ganmin
 * @version : 1.0
 * @date : 2022/11/10 19:41
 * 测试
 */
public class Test {
    public static void main(String[] args) {
        Observer1 fObserver = new Observer1();
        Observer2 sObserver = new Observer2();
        Observer3 tObserver = new Observer3();
        Subject subject = new Subject();
        subject.addAttach(fObserver);
        subject.addAttach(sObserver);
        subject.addAttach(tObserver);
        subject.setMsg("被观察者发生了改变");
    }
}
